package com.example.datlichkham;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.example.common.AppConfig;
import com.example.dto.Benhvien;
import com.example.dto.Chuyenkhoa;
import com.example.dto.Lichkham;


public class Dangkithanhcong extends ActionBarActivity {
    Button btnTrove3;
    private String c, d;
    Chuyenkhoa chuyenkhoa;
    Benhvien benhvien;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dangkithanhcong);
        final TextView txtBv = (TextView) findViewById(R.id.txtBv);
        final TextView txtKhoa = (TextView) findViewById(R.id.txtKhoa);
        final TextView txtNgay = (TextView) findViewById(R.id.txtNgay);
        final TextView txtGio = (TextView) findViewById(R.id.txtGio);
        Intent intent = getIntent();
        Lichkham bundle = (Lichkham)intent.getSerializableExtra("ObjectLichKham");

        txtBv.setText(""+bundle.tenBacsi);
        txtKhoa.setText(""+bundle.tenChuyenkhoa);
        txtNgay.setText("" + bundle.Ngay );
        txtGio.setText("" + bundle.Gio );
        btnTrove3 = (Button) findViewById(R.id.btnTrove3);
        btnTrove3.setOnClickListener(new  View.OnClickListener(){
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Dangkithanhcong.this, DatLichKham.class);
                startActivity(intent);
                finish();
            }
        });
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_dangkithanhcong, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}
